// import request from "@/utils/request";
import mockrequest from "@/utils/trainingRequest";
export interface historyList {
    momentSubject: string;
    creator: string;
    createTime: number;
    momentBackup:object
    momentTitle: string;
    updateTime: number;
    id: string;
    momentId: string;
}
export interface exerciseList {
    canAccess: boolean;
    contentCount: number;
    cover: string;
    createMethod: string;
    creator: string;
    deleteFlag: boolean;
    id: string;
    isDelete: number;
    openOutside: number;
    planAddCount: number;
    planName: string;
    status: string;
    weekTrainedCount: number;
    weekTrainedDuration: number;
    weeklyPlanCount: number;
    weeklyPlanDuration: number;
}
export interface exerciseModel<T> {
    content: T[];
    first: boolean;
    last: boolean;
    number: number;
    numberOfElements: number;
    offset: null;
    size: number;
    sort: null;
    statistics: null;
    totalElements: number;
    totalPages: number;
    useOffset: boolean;
}

export default{
    getTrainingCenter(){
        return mockrequest.get<any, any>('/trainingCenter')
    },
    getmycreate(val:string){
        return mockrequest.get<any, any>(`/${val}`)
    },
    getHistoryData(){
        return mockrequest.get<any, any>(`/viewRecords`)
    },
    getDetailData(){
        return mockrequest.get<any,any>(`/detail`)
    },
    // getmyjoin(){
    //     return mockrequest.get<any, exerciseModel<exerciseList>>('/mycreate')
    // },
    // getmycourse(){
    //     return mockrequest.get<any, exerciseModel<exerciseList>>('/mycourse')
    // }
}





// export default {
//     // get https://www.dance365.com/apis/eShop/refundOrderFees?access_token=a96b3897-6d9c-4944-b00b-499a8ad7d3af
//     // get https://www.dance365.com/apis/trainingCenter/plans/search/findByUserId?access_token=a96b3897-6d9c-4944-b00b-499a8ad7d3af&pageSize=20&pageNum=0&type=system
//     getTrainingCenter(
//         token: string,
//         pageSize: number,
//         current: number,
//         system: string
//     ) {
//         return request.get<any, exerciseModel<exerciseList>>(
//             `https://www.dance365.com/apis/trainingCenter/plans/search/findByUserId?access_token=${token}&pageSize=${pageSize}&pageNum=${current}&type=${system}`
//         );
//     },
//     // get https://www.dance365.com/apis/trainingCenter/plans/search/findByUserId?myListCategory=my_create&access_token=a96b3897-6d9c-4944-b00b-499a8ad7d3af&pageSize=20&pageNum=0&type=system
//     getMycreateList(
//         my_create: string,
//         token: string,
//         pageSize: number,
//         current: number,
//         system: string
//     ) {
//         return request.get<any, exerciseModel<exerciseList>>(
//             `/trainingCenter/plans/search/findByUserId?myListCategory=${my_create}&access_token=${token}&pageSize=${pageSize}&pageNum=${current}&type=${system}`
//         );
//     },
//     //https://www.dance365.com/apis/moment/viewRecords?access_token=a96b3897-6d9c-4944-b00b-499a8ad7d3af&pageSize=10
//     getHistoryList(token: string, pageSize: number) {
//         return request.get<any,exerciseModel<historyList>>(
//             `/moment/viewRecords?access_token=${token}&pageSize=${pageSize}`
//         );
//     },
// };
